include("sh_team.lua")
include( "sh_class.lua" )

GM.Name 	= "SourceForts"
GM.Author 	= "Nican"
GM.Email 	= ""
GM.Website 	= "www.nican.net"
GM.TeamBased 	= true

EntityDebug = false

function ValidPlayer( ply )
	return ply && ply:IsValid() && ply:IsPlayer()
end

/*---------------------------------------------------------
   Name: gamemode:PlayerShouldTakeDamage
   Return true if this player should take damage from this attacker
---------------------------------------------------------*/
function GM:PlayerShouldTakeDamage( ply, attacker )
	if Game.State() == Game.BUILD then
		return false
	end
	
	if ply != attacker && ValidPlayer( attacker ) then
		return ply:Team() != attacker:Team()
	end
	
	return true
end